package com.ruoyi.applyrecord.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.applyrecord.mapper.HouseContarctApplyRecordMapper;
import com.ruoyi.applyrecord.domain.HouseContarctApplyRecord;
import com.ruoyi.applyrecord.service.IHouseContarctApplyRecordService;

/**
 * 合同审批流程Service业务层处理
 * 
 * @author hct
 * @date 2022-03-10
 */
@Service
public class HouseContarctApplyRecordServiceImpl implements IHouseContarctApplyRecordService 
{
    @Autowired
    private HouseContarctApplyRecordMapper houseContarctApplyRecordMapper;

    /**
     * 查询合同审批流程
     * 
     * @param id 合同审批流程主键
     * @return 合同审批流程
     */
    @Override
    public HouseContarctApplyRecord selectHouseContarctApplyRecordById(Long id)
    {
        return houseContarctApplyRecordMapper.selectHouseContarctApplyRecordById(id);
    }

    /**
     * 查询合同审批流程列表
     * 
     * @param houseContarctApplyRecord 合同审批流程
     * @return 合同审批流程
     */
    @Override
    public List<HouseContarctApplyRecord> selectHouseContarctApplyRecordList(HouseContarctApplyRecord houseContarctApplyRecord)
    {
        return houseContarctApplyRecordMapper.selectHouseContarctApplyRecordList(houseContarctApplyRecord);
    }

    /**
     * 新增合同审批流程
     * 
     * @param houseContarctApplyRecord 合同审批流程
     * @return 结果
     */
    @Override
    public int insertHouseContarctApplyRecord(HouseContarctApplyRecord houseContarctApplyRecord)
    {
        houseContarctApplyRecord.setCreateTime(DateUtils.getNowDate());
        return houseContarctApplyRecordMapper.insertHouseContarctApplyRecord(houseContarctApplyRecord);
    }

    /**
     * 修改合同审批流程
     * 
     * @param houseContarctApplyRecord 合同审批流程
     * @return 结果
     */
    @Override
    public int updateHouseContarctApplyRecord(HouseContarctApplyRecord houseContarctApplyRecord)
    {
        houseContarctApplyRecord.setUpdateTime(DateUtils.getNowDate());
        return houseContarctApplyRecordMapper.updateHouseContarctApplyRecord(houseContarctApplyRecord);
    }

    /**
     * 批量删除合同审批流程
     * 
     * @param ids 需要删除的合同审批流程主键
     * @return 结果
     */
    @Override
    public int deleteHouseContarctApplyRecordByIds(Long[] ids)
    {
        return houseContarctApplyRecordMapper.deleteHouseContarctApplyRecordByIds(ids);
    }

    /**
     * 删除合同审批流程信息
     * 
     * @param id 合同审批流程主键
     * @return 结果
     */
    @Override
    public int deleteHouseContarctApplyRecordById(Long id)
    {
        return houseContarctApplyRecordMapper.deleteHouseContarctApplyRecordById(id);
    }
}
